home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3p / pthread_once.z / pthread_once
Encoding:
Text File  |  2002-10-03  |  2.1 KB  |  67 lines

  1.  
  2.  
  3.  
  4. pppptttthhhhrrrreeeeaaaadddd____oooonnnncccceeee((((3333PPPP))))                                              pppptttthhhhrrrreeeeaaaadddd____oooonnnncccceeee((((3333PPPP))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      pthread_once - thread-safe initialization
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<pppptttthhhhrrrreeeeaaaadddd....hhhh>>>>
  13.  
  14.      iiiinnnntttt pppptttthhhhrrrreeeeaaaadddd____oooonnnncccceeee((((pppptttthhhhrrrreeeeaaaadddd____oooonnnncccceeee____tttt ****oooonnnncccceeee,,,, vvvvooooiiiidddd ((((****iiiinnnniiiitttt))))((((vvvvooooiiiidddd))))))));;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      The _p_t_h_r_e_a_d__o_n_c_e() function ensures that the function _i_n_i_t is called
  18.      exactly once for all callers using the _o_n_c_e initialization variable.
  19.      This variable is initialized with the constant PPPPTTTTHHHHRRRREEEEAAAADDDD____OOOONNNNCCCCEEEE____IIIINNNNIIIITTTT.  While
  20.      _i_n_i_t is being executed all callers of _p_t_h_r_e_a_d__o_n_c_e() will wait.
  21.  
  22.      If a thread is cancelled while executing the _i_n_i_t function [see
  23.      _p_t_h_r_e_a_d__s_e_t_c_a_n_c_e_l_s_t_a_t_e()], then _p_t_h_r_e_a_d__o_n_c_e() will permit another thread
  24.      (possibly waiting) to make the call.
  25.  
  26. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  27.      There are no errors for _p_t_h_r_e_a_d__o_n_c_e.
  28.  
  29. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  30.      pthread_setcancelstate(3P).
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.